<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title>广东国防教育学会</title>
		<meta name="viewport" content="initial-scale=1, maximum-scale=1">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/sm.min.css" />
		<link rel="stylesheet" href="http://idangero.us/swiper/dist/css/swiper.min.css" />
		<link rel="stylesheet" href="/Public/Home/activity/css/style.css" />
	</head>
	<body>

		<div class="bar bar-nav">
			<h1 class="title">报名人数 (<?php echo ($sign_count); ?>)</h1>
			<i class="icon icon-left" onclick="window.history.go(-1);"></i>
		</div>
		<style>
			.sign_search{background:#f1f1f1;padding:.5rem .5rem;}
		</style>
		<div class="content">
			<div class="row discuss sign_list no-border" style="margin-top:0;">
				<form action="<?php echo U('Index/send_sms');?>" method="post" id="operate_form">
					<div class="col-100 sign_search text-center">
						<button class="prompt-ok button button-fill" style="margin:0 auto;width:100%;">发送短信通知</button>
					</div>
				<div class="col-100">
					<div class="content-padded">
						<div class="list-block media-list" style="margin-top:0;">
							<ul class="list_activity_data">
							<li class="item-content">
									<div class="item-media">
									<label>
									<input type="radio" name="select" onclick="checkSelect()"/>
									<span style="font-size:12px;">全选</span>
									</label>
									&nbsp;
									&nbsp;
									<label>
									<input type="radio" name="select" onclick="checkNOSelect()"/>
									<span style="font-size:12px;">全不选</span>
									</label>
									&nbsp;
									&nbsp;
									<label>
									<input type="radio" name="select" onclick="checkRESelect()"/>
									<span style="font-size:12px;">反选</span>
									</label>
									</div>
								</li>
							<?php if(is_array($sign)): foreach($sign as $k=>$sign): ?><li class="item-content">
									<div class="item-media">
									<input type="checkbox" name="item[]" value="<?php echo ($sign['mobile']); ?>" />&nbsp;&nbsp;&nbsp;
										<img src="<?php echo ($sign['headimgurl']); ?>">
									</div>
									<div class="item-inner">
										<div class="item-title-row">
											<div class="item-title"><?php echo ($sign['name']); ?><span class="pull-right"><?php echo (date("Y-m-d",$sign['add_time'])); ?></span></div>
										</div>
									</div>
								</li><?php endforeach; endif; ?>
							</ul>
						</div>
					</div>
				</div>
				</form>
			</div>
			<?php if($signup_show): ?><div class="infinite-scroll-preloader" style="display:none;">
				<div class="preloader"></div>
			</div>
			<p onclick="ajax_sourch_submit();" id="load_more"><span class="icon icon-down"></span> 点击加载更多...</p>
			<?php else: ?>
			<p id="load_more"> 暂无数据！</p><?php endif; ?>
			</div>
</div>

		<script type="text/javascript" src="http://g.alicdn.com/sj/lib/jquery/dist/jquery.min.js"></script>
		<script type='text/javascript' src='http://g.alicdn.com/sj/lib/zepto/zepto.min.js' charset='utf-8'></script>
		<script type='text/javascript' src='http://g.alicdn.com/msui/sm/0.6.2/js/sm.min.js' charset='utf-8'></script>
		<script src="http://idangero.us/swiper/dist/js/swiper.min.js"></script>
		<script type="text/javascript" src="/Public/Home/activity/js/huodon.js" ></script>
		<script>
			
			var swiper = new Swiper('.swiper-container', {
				pagination: '.swiper-pagination',
				paginationClickable: true,
				loop:true,    
				grabCursor: true,
				autoplay: 3000
			});
			
			 /* $(document).on('click','.open-preloader', function () {
				 Zepto.showPreloader('加载中...')
				    setTimeout(function () {
				    	 Zepto.hidePreloader();
				    }, 2000); 
			 }); */
			 $(document).on('click','.open-indicator', function () {
				 Zepto.showIndicator();
			     setTimeout(function () {
			    	Zepto.hideIndicator();
			     }, 2000);
			  });
		</script>
		

	</body>

</html>
<script>
var activity_id = <?php echo ($_GET['activity_id']); ?>;
var  page = 1;
 /*** ajax 提交表单 查询订单列表结果*/  
 function ajax_sourch_submit()
 {	 	 	 
	 	$(".infinite-scroll-preloader").show();
        page += 1;
		$.ajax({
			type : "GET",
			//url:"/index.php?m=Mobile&c=User&a=collect_list&is_ajax=1&p="+page,//+tab,			
			url:"/Users/lookSignup/activity_id/"+activity_id+"/is_ajax/1/p/"+page,//+tab,
//			data : $('#filter_form').serialize(),// 你的formid 搜索表单 序列化提交
			success: function(data)
			{
				$(".infinite-scroll-preloader").hide();
				if($.trim(data) == ''){
					$('#load_more').hide();
				}else{
				    $(".list_activity_data").append(data);
				}
			}
		}); 
 } 
 
 //全选
 function checkSelect(){	
	$("input[name='item[]']").prop("checked", true);
 }

	//全不选
 function checkNOSelect(){
	$("input[name='item[]']").prop("checked", false);
 }

	//反选
 function checkRESelect(){
	 //alert($("input[name='item[]']").size());
	 $("input[name='item[]']").each(function () {         
       if($(this).prop("checked")){
        $(this).prop("checked", false);
       }else{
        $(this).prop("checked", true);
       }
   });
 }
 
 $('#operate_form').submit(function(){
     var selected = $("input[name='item[]']:checked");
     if(selected.length < 1){
 		Zepto.alert('请选择报名用户！');
 		return false;
     }
     
 });
	
</script>